package cn.libinal.scloud.winter.service.impl;

import cn.libinal.scloud.winter.domain.ProductVo;
import cn.libinal.scloud.winter.entity.Product;
import ma.glasnost.orika.MapperFactory;
import ma.glasnost.orika.impl.ConfigurableMapper;
import org.springframework.stereotype.Component;

/**
 * @author libinal
 * created at 2018/11/3 19:15
 */
@Component
public class DtoMapper extends ConfigurableMapper {
    @Override
    protected void configure(MapperFactory factory) {
        factory.classMap(Product.class, ProductVo.class).byDefault().register();
    }
}
